#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_exam4.py
# author:柴运泽
# datetime:2022-02-06 17:21
# software: PyCharm

"""
4 输入三个整数x,y,z，请把这三个数由小到大输出
"""

t = input().split(',')  # list

t.sort()
for i in t:
    print(int(i))